<!-- #layout name=noMenu --sideType='domain'-->

<div class="page-header">
    <h1 class="title">SSL Certificate</h1>
</div>
<div class="navbar navbar-default">
    <div class="container-fluid">

        <a k-if="kooboosetting.IsLocal = false" class="btn green navbar-btn" data-bind="click: showDialog">
            <span>Generate certificate</span> <i class="fa fa-plus"></i>
        </a>

        <a data-bind="visible: showDeleteBtn, click: onDelete" class="btn red navbar-btn">Delete</a>
    </div>
</div>
<div data-bind="component: { name: 'kb-table', params: tableData }"></div>

<div class="modal fade" data-bind="modal: dialogShow" data-backdrop="static" data-keyboard="false">
    <div class="modal-dialog">
        <form>
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-bind="click: cancelDialog">
                        <i class="fa fa-close"></i>
                    </button>
                    <h4 class="modal-title">Select a domain</h4>
                </div>
                <div class="modal-body">
                    <div class="form-horizontal">
                        <div class="form-group">
                            <label class="col-md-2 control-label" for="DomainName">Domain</label>
                            <div class="col-md-10">
                                <div class="form-inline">
                                    <input type="text" class="form-control input-small" data-bind="value: subDomain">
                                    <select class="form-control input-small" data-bind="options: domainList, optionsText: 'name', optionsValue: 'name', value: selectedDomain"></select>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button data-bind="click: save" class="btn green">Generate</button>
                    <button data-bind="click: cancelDialog" class="btn gray">Cancel</button>
                </div>
            </div>
        </form>
    </div>
</div>

<script>
    (function() {
        Kooboo.loadJS([
            "/_Admin/Scripts/components/kbTable.js",
            "/_Admin/Scripts/tableModel.js"
        ])
    })()
</script>
<script src="/_Admin/View/Domains/Certificate.js"></script>